Optimal. Leaf size=126 \[ -\frac {1}{4} \sqrt {b} (3 a+2 b) \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} (a+b)^{3/2} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{4} \left (2 (a+b)-b \tan ^2(x)\right ) \sqrt {a+b \tan ^4(x)}+\frac {1}{6} \left (a+b \tan ^4(x)\right )^{3/2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.533, Rules used = {3751, 1262,
749, 829, 858, 223, 212, 739} \begin {gather*} \frac {1}{6} \left (a+b \tan ^4(x)\right )^{3/2}+\frac {1}{4} \left (2 (a+b)-b \tan ^2(x)\right ) \sqrt {a+b \tan ^4(x)}-\frac {1}{2} (a+b)^{3/2} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{4} \sqrt {b} (3 a+2 b) \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 223
Rule 739
Rule 749
Rule 829
Rule 858
Rule 1262
Rule 3751
Rubi steps
\begin {align*} \int \tan (x) \left (a+b \tan ^4(x)\right )^{3/2} \, dx &=\text {Subst}\left (\int \frac {x \left (a+b x^4\right )^{3/2}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {\left (a+b x^2\right )^{3/2}}{1+x} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{6} \left (a+b \tan ^4(x)\right )^{3/2}+\frac {1}{2} \text {Subst}\left (\int \frac {(a-b x) \sqrt {a+b x^2}}{1+x} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{4} \left (2 (a+b)-b \tan ^2(x)\right ) \sqrt {a+b \tan ^4(x)}+\frac {1}{6} \left (a+b \tan ^4(x)\right )^{3/2}+\frac {\text {Subst}\left (\int \frac {a b (2 a+b)-b^2 (3 a+2 b) x}{(1+x) \sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )}{4 b}\\ &=\frac {1}{4} \left (2 (a+b)-b \tan ^2(x)\right ) \sqrt {a+b \tan ^4(x)}+\frac {1}{6} \left (a+b \tan ^4(x)\right )^{3/2}+\frac {1}{2} (a+b)^2 \text {Subst}\left (\int \frac {1}{(1+x) \sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )-\frac {1}{4} (b (3 a+2 b)) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{4} \left (2 (a+b)-b \tan ^2(x)\right ) \sqrt {a+b \tan ^4(x)}+\frac {1}{6} \left (a+b \tan ^4(x)\right )^{3/2}-\frac {1}{2} (a+b)^2 \text {Subst}\left (\int \frac {1}{a+b-x^2} \, dx,x,\frac {a-b \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{4} (b (3 a+2 b)) \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )\\ &=-\frac {1}{4} \sqrt {b} (3 a+2 b) \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} (a+b)^{3/2} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{4} \left (2 (a+b)-b \tan ^2(x)\right ) \sqrt {a+b \tan ^4(x)}+\frac {1}{6} \left (a+b \tan ^4(x)\right )^{3/2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.04, size = 166, normalized size = 1.32 \begin {gather*} \frac {1}{12} \left (-6 \sqrt {b} (a+b) \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-6 (a+b)^{3/2} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )+\sqrt {a+b \tan ^4(x)} \left (8 a+6 b-3 b \tan ^2(x)+2 b \tan ^4(x)\right )-\frac {3 \sqrt {a} \sqrt {b} \sinh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a}}\right ) \sqrt {a+b \tan ^4(x)}}{\sqrt {1+\frac {b \tan ^4(x)}{a}}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(312\) vs.
\(2(103)=206\).
time = 0.09, size = 313, normalized size = 2.48
method | result | size |
derivativedivides | \(\frac {b \left (\tan ^{4}\left (x \right )\right ) \sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}}{6}+\frac {2 a \sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}}{3}-\frac {b \left (\tan ^{2}\left (x \right )\right ) \sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}}{4}-\frac {3 a \sqrt {b}\, \ln \left (\sqrt {b}\, \left (\tan ^{2}\left (x \right )\right )+\sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}\right )}{4}+\frac {b \sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}}{2}-\frac {b^{\frac {3}{2}} \ln \left (\sqrt {b}\, \left (\tan ^{2}\left (x \right )\right )+\sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}\right )}{2}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tan ^{2}\left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{1+\tan ^{2}\left (x \right )}\right ) a^{2}}{2 \sqrt {a +b}}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tan ^{2}\left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{1+\tan ^{2}\left (x \right )}\right ) a b}{\sqrt {a +b}}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tan ^{2}\left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{1+\tan ^{2}\left (x \right )}\right ) b^{2}}{2 \sqrt {a +b}}\) | \(313\) |
default | \(\frac {b \left (\tan ^{4}\left (x \right )\right ) \sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}}{6}+\frac {2 a \sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}}{3}-\frac {b \left (\tan ^{2}\left (x \right )\right ) \sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}}{4}-\frac {3 a \sqrt {b}\, \ln \left (\sqrt {b}\, \left (\tan ^{2}\left (x \right )\right )+\sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}\right )}{4}+\frac {b \sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}}{2}-\frac {b^{\frac {3}{2}} \ln \left (\sqrt {b}\, \left (\tan ^{2}\left (x \right )\right )+\sqrt {a +b \left (\tan ^{4}\left (x \right )\right )}\right )}{2}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tan ^{2}\left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{1+\tan ^{2}\left (x \right )}\right ) a^{2}}{2 \sqrt {a +b}}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tan ^{2}\left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{1+\tan ^{2}\left (x \right )}\right ) a b}{\sqrt {a +b}}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tan ^{2}\left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tan ^{2}\left (x \right )\right )^{2}-2 b \left (1+\tan ^{2}\left (x \right )\right )+a +b}}{1+\tan ^{2}\left (x \right )}\right ) b^{2}}{2 \sqrt {a +b}}\) | \(313\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.91, size = 593, normalized size = 4.71 \begin {gather*} \left [\frac {1}{8} \, {\left (3 \, a + 2 \, b\right )} \sqrt {b} \log \left (-2 \, b \tan \left (x\right )^{4} + 2 \, \sqrt {b \tan \left (x\right )^{4} + a} \sqrt {b} \tan \left (x\right )^{2} - a\right ) + \frac {1}{4} \, {\left (a + b\right )}^{\frac {3}{2}} \log \left (\frac {{\left (a b + 2 \, b^{2}\right )} \tan \left (x\right )^{4} - 2 \, a b \tan \left (x\right )^{2} + 2 \, \sqrt {b \tan \left (x\right )^{4} + a} {\left (b \tan \left (x\right )^{2} - a\right )} \sqrt {a + b} + 2 \, a^{2} + a b}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) + \frac {1}{12} \, {\left (2 \, b \tan \left (x\right )^{4} - 3 \, b \tan \left (x\right )^{2} + 8 \, a + 6 \, b\right )} \sqrt {b \tan \left (x\right )^{4} + a}, \frac {1}{4} \, {\left (3 \, a + 2 \, b\right )} \sqrt {-b} \arctan \left (\frac {\sqrt {b \tan \left (x\right )^{4} + a} \sqrt {-b}}{b \tan \left (x\right )^{2}}\right ) + \frac {1}{4} \, {\left (a + b\right )}^{\frac {3}{2}} \log \left (\frac {{\left (a b + 2 \, b^{2}\right )} \tan \left (x\right )^{4} - 2 \, a b \tan \left (x\right )^{2} + 2 \, \sqrt {b \tan \left (x\right )^{4} + a} {\left (b \tan \left (x\right )^{2} - a\right )} \sqrt {a + b} + 2 \, a^{2} + a b}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) + \frac {1}{12} \, {\left (2 \, b \tan \left (x\right )^{4} - 3 \, b \tan \left (x\right )^{2} + 8 \, a + 6 \, b\right )} \sqrt {b \tan \left (x\right )^{4} + a}, -\frac {1}{2} \, {\left (a + b\right )} \sqrt {-a - b} \arctan \left (\frac {\sqrt {b \tan \left (x\right )^{4} + a} {\left (b \tan \left (x\right )^{2} - a\right )} \sqrt {-a - b}}{{\left (a b + b^{2}\right )} \tan \left (x\right )^{4} + a^{2} + a b}\right ) + \frac {1}{8} \, {\left (3 \, a + 2 \, b\right )} \sqrt {b} \log \left (-2 \, b \tan \left (x\right )^{4} + 2 \, \sqrt {b \tan \left (x\right )^{4} + a} \sqrt {b} \tan \left (x\right )^{2} - a\right ) + \frac {1}{12} \, {\left (2 \, b \tan \left (x\right )^{4} - 3 \, b \tan \left (x\right )^{2} + 8 \, a + 6 \, b\right )} \sqrt {b \tan \left (x\right )^{4} + a}, -\frac {1}{2} \, {\left (a + b\right )} \sqrt {-a - b} \arctan \left (\frac {\sqrt {b \tan \left (x\right )^{4} + a} {\left (b \tan \left (x\right )^{2} - a\right )} \sqrt {-a - b}}{{\left (a b + b^{2}\right )} \tan \left (x\right )^{4} + a^{2} + a b}\right ) + \frac {1}{4} \, {\left (3 \, a + 2 \, b\right )} \sqrt {-b} \arctan \left (\frac {\sqrt {b \tan \left (x\right )^{4} + a} \sqrt {-b}}{b \tan \left (x\right )^{2}}\right ) + \frac {1}{12} \, {\left (2 \, b \tan \left (x\right )^{4} - 3 \, b \tan \left (x\right )^{2} + 8 \, a + 6 \, b\right )} \sqrt {b \tan \left (x\right )^{4} + a}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan ^{4}{\left (x \right )}\right )^{\frac {3}{2}} \tan {\left (x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 138, normalized size = 1.10 \begin {gather*} \frac {1}{4} \, {\left (3 \, a \sqrt {b} + 2 \, b^{\frac {3}{2}}\right )} \log \left ({\left | -\sqrt {b} \tan \left (x\right )^{2} + \sqrt {b \tan \left (x\right )^{4} + a} \right |}\right ) + \frac {1}{12} \, \sqrt {b \tan \left (x\right )^{4} + a} {\left ({\left (2 \, b \tan \left (x\right )^{2} - 3 \, b\right )} \tan \left (x\right )^{2} + \frac {2 \, {\left (4 \, a b + 3 \, b^{2}\right )}}{b}\right )} + \frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \arctan \left (-\frac {\sqrt {b} \tan \left (x\right )^{2} - \sqrt {b \tan \left (x\right )^{4} + a} + \sqrt {b}}{\sqrt {-a - b}}\right )}{\sqrt {-a - b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \mathrm {tan}\left (x\right )\,{\left (b\,{\mathrm {tan}\left (x\right )}^4+a\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________